<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="证书名称"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <j-dict-select-tag
                :show-search="true"
                v-model="queryParam.certificateName"
                dictCode="erp_certificate_name_management,certificate_name,id"
                placeholder="请选择证书名称" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="学历"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <j-dict-select-tag placeholder="请选择学历" v-model="queryParam.highestDegree" dictCode="highest_degree" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="所学专业"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <a-input placeholder="请输入所学专业" v-model="queryParam.major"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="注册类别"
              :labelCol="labelCol"
              :wrapperCol="labelCol">
              <a-select
                show-search
                v-model="queryParam.categoryId"
                placeholder="请选择注册类别"
                style="width: 100%"
                allowClear
                :filterOption="filterOption"
                @change="handleCategoryChange">
                <a-select-option v-for="d in categoryList" :key="d.id">
                  {{ d.registrationCategory }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="注册专业"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <a-select
                show-search
                allowClear
                v-model="queryParam.professionalId"
                placeholder="请选择注册专业"
                style="width: 100%"
                :filterOption="filterOption">
                <a-select-option v-for="d in professionalList" :key="d.id">
                  {{ d.registeredProfessional }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="人员名称"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <a-input placeholder="请输入人员名称" v-model="queryParam.name"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="参保单位"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <select-Company-input v-model="queryParam.insuredUnit" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="所属团队"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <select-team-input :query-type="'parent'" placeholder="请选择团队" v-model="queryParam.teamId" :tdlx="3" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="关系状态"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <j-dict-select-tag
                placeholder="请选择关系状态"
                v-model="queryParam.relationshipState"
                dictCode="relationship_state" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item
              label="证书状态"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <j-dict-select-tag placeholder="请选择证书状态" v-model="queryParam.isExpired" dictCode="is_expired" />
            </a-form-item>
          </a-col>
          <!-- <template v-if="toggleSearchStatus"></template> -->
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
              </a> -->
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button type="primary" icon="download" @click="handleExportXls('员工证书')">导出</a-button>
    </div>
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{ x: 1600 }"
        :components="draggableComponent"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="false"
        :loading="loading"
        class="j-table-force-nowrap"
        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
        <span slot="action" slot-scope="text, record">
          <a :class="record.isAction?'':'newColor'" @click="handlePreview(record)">预览</a>
          <a-divider type="vertical" />
          <a :class="record.isAction?'':'newColor'" @click="handleModal(record)">下载</a>
        </span>
      </a-table>
      <div style="margin-top: 20px;text-align: right;">
        <a-pagination
          v-model="ipagination.current"
          :total="ipagination.total"
          :pageSize="ipagination.pageSize"
          :showQuickJumper="ipagination.showQuickJumper"
          :showSizeChanger="ipagination.showSizeChanger"
          :showTotal="ipagination.showTotal"
          :pageSizeOptions="ipagination.pageSizeOptions"
          @change="handleTableChange"
          @showSizeChange="handleTableChange" />
      </div>
    </div>
    <EmployeeExpirationReminder v-if="hasPerm" />
    <ErpCertificatePersonnelModal ref="personForm" />
    <ErpEmployeeFileModalDetail ref="detailForm" />
    <watermark ref="watermarks" @ok="downloadOK" />
    <a-modal title="请选择预览或下载" :visible="prebtnVisible" :footer="null" @cancel="handleNewPreCancel" :width="240">
      <div style="text-align: center;">
        <a-button shape="circle" icon="search" @click="handlePreviews(prebtnFile)" />
        <a-divider type="vertical" />
        <a-button shape="circle" icon="download" @click="handleModals(prebtnFile)" />
      </div>
    </a-modal>
  </a-card>
</template>

<script>
import { mixinDevice } from '@/utils/mixin'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'
import { getAction } from '@/api/manage'
import { filterObj } from '@/utils/util'
import { filterMultiDictText, initDictOptions } from '@/components/dict/JDictSelectUtil'
import PreviewPdf from '@/utils/previewPdfPublic'
import { axios } from '@/utils/request'
import moment from 'moment'
import { mapGetters } from 'vuex'
import SelectCompanyInput from '@/views/scy/components/SelectCompanyInput'
import EmployeeExpirationReminder from './EmployeeExpirationReminder.vue'
import ErpCertificatePersonnelModal from '@/views/erp/certificatePersonnel/modules/ErpCertificatePersonnelModal.vue'
import ErpEmployeeFileModalDetail from './modules/ErpEmployeeFileModalDetail.vue'
import watermark from '@/views/erp/hr/certificatefile/companyQualification/modules/watermark.vue'
import { queryPermissionsByUser } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import SelectTeamInput from '@/views/scy/components/SelectTeamInput'
export default {
  name: 'ErpEmployeeCertificateList',
  mixins: [mixinDevice, DisabledAuthFilterMixin, JeecgListMixin],
  components: {
    SelectCompanyInput,
    EmployeeExpirationReminder,
    watermark,
    ErpCertificatePersonnelModal,
    ErpEmployeeFileModalDetail,
    SelectTeamInput
  },
  data() {
    return {
      description: '员工证书管理页面',
      ipagination: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['5', '10', '20', '30', '50', '100', '200'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' 共 ' + total + ' 条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      // 列定义
      columns: [
        {
          title: '姓名',
          align: 'center',
          dataIndex: 'name',
          width: 60,
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: this.$createElement(
                'a',
                {
                  on: {
                      click: () => {
                      this.showInfo(record)
                  }
                }
              },
              [
                  this.$createElement(
                    'span'
                  ),
                  value
              ]),
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '性别',
          align: 'center',
          width: 60,
          dataIndex: 'gender_dictText',
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '身份证号',
          align: 'center',
          dataIndex: 'idCardNo',
          width: 200,
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '身份证到期日',
          align: 'center',
          dataIndex: 'idCardNoDue',
          width: 150,
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '学历',
          align: 'center',
          dataIndex: 'highestDegree_dictText',
          ellipsis: true,
          width: 60,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '所学专业',
          align: 'center',
          dataIndex: 'major',
          width: 100,
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '所属团队',
          align: 'center',
          dataIndex: 'teamId_dictText',
          width: 100,
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '劳动合同',
          align: 'center',
          dataIndex: 'contract',
          width: 200,
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: this.$createElement(
                'a',
                {
                  on: {
                      click: () => {
                      this.handleNewPre(value)
                  }
                }
              },
              [
                  this.$createElement(
                    'span'
                  ),
                  value
              ]),
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '合同有效期',
          align: 'center',
          dataIndex: 'contractLife',
          width: 100,
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '参保单位',
          align: 'center',
          width: 200,
          dataIndex: 'insuredUnit_dictText',
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '关系状态',
          align: 'center',
          width: 100,
          dataIndex: 'relationshipState_dictText',
          ellipsis: true,
          customRender: (value, record, index) => {
            return {
              children: value,
              attrs: { rowSpan: record.span }
            };
          }
        },
        {
          title: '注册类别',
          align: 'center',
          dataIndex: 'categoryId',
          ellipsis: true,
          width: 200,
          customRender: (value, record, index) => {
            let text = ''
            if (!value) {
              text = ''
            } else {
              text = filterMultiDictText(this.dictOptions['categoryId'], value + '')
            }
            return {
              children: text,
              attrs: { rowSpan: record.childspan }
            };
          }
        },
        {
          title: '注册专业',
          align: 'center',
          width: 200,
          dataIndex: 'professionalId',
          ellipsis: true,
          customRender: (value, row, index) => {
            if (!value) {
              return ''
            } else {
              return filterMultiDictText(this.dictOptions['professionalId'], value + '')
            }
          }
        },
        {
          title: '证书名称',
          align: 'center',
          width: 200,
          dataIndex: 'certificateNames',
          customRender: (value, row, index) => {
            if (!value) {
              return ''
            } else {
              return filterMultiDictText(this.dictOptions['certificateNames'], value + '')
            }
          },
          ellipsis: true
        },
        {
          title: '颁发机构',
          align: 'center',
          width: 200,
          dataIndex: 'issueBody',
          ellipsis: true
        },
        {
          title: '颁发日期',
          align: 'center',
          width: 200,
          dataIndex: 'issueDate',
          ellipsis: true
        },
        {
          title: '继续教育时间',
          align: 'center',
          width: 200,
          dataIndex: 'educationDate',
          ellipsis: true
        },
        {
          title: '到期时间',
          align: 'center',
          dataIndex: 'endDate',
          width: 200,
          ellipsis: true,
          customRender: (text, r) => {
            if (r.isAlways == 1) {
              return ''
            } else {
              return text
            }
          }
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 150,
          scopedSlots: {
            filterDropdown: 'filterDropdown',
            filterIcon: 'filterIcon',
            customRender: 'action'
          }
        }
      ],
      url: {
        list: '/api/erp/files/employee/erpEmployeeFile/queryCertificate',
        downloadCertificate: '/api/erp/files/employee/erpEmployeeFile/downloadCertificate',
        // delete: '/api/erp/files/company/erpCompanyFiles/delete',
        // deleteBatch: '/api/erp/files/company/erpCompanyFiles/deleteBatch',
        exportXlsUrl: '/api/erp/files/employee/erpEmployeeCertificate/exportEmployeeCertificateXls'
        // importExcelUrl: 'api/erp/files/company/erpCompanyFiles/importExcel',
      },
      dictOptions: {},
      toggleSearchStatus: false,
      loading: false /* 排序参数 */,
      isorter: {
        column: 'createTime',
        order: 'desc'
      },
      queryParam: {},
      /* 数据源 */
      dataSource: [],
      categoryList: [],
      professionalList: [],
      prebtnVisible: false,
      prebtnFile: '',
      authData: [],
      hasPerm: false
    }
  },
  created() {
    this.initDictConfig()
    this.loadData()
    this.getCategoryData()
    this.getAuthFilter('employeeCertificateList:expired')
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    },
    draggableComponent: function() {
      return this.dragResizable(this.columns)
    }
  },
  methods: {
    moment,
    ...mapGetters(['userInfo']),
    showInfo(record) {
      if (record.relationshipState == '1' || record.relationshipState == '2') {
        this.$refs.detailForm.edit(record)
        this.$refs.detailForm.title = '详情'
        this.$refs.detailForm.disableSubmit = true
      } else {
        this.$refs.personForm.edit(record)
        this.$refs.personForm.title = '详情'
        this.$refs.personForm.disableSubmit = true
        this.$refs.personForm.waterPdisable = true
      }
    },
    getAuthFilter(code) {
      queryPermissionsByUser().then(response => {
        let hasPerm = true
        const authData = response.result.auth;
        let permissions = authData.map((item) => item.action)
        if (!permissions.includes(code)) {
          hasPerm = false;
        }
        this.hasPerm = hasPerm
      })
    },
    handleNewPre(value) {
      this.prebtnVisible = true
      this.prebtnFile = value
    },
    handleNewPreCancel() {
      this.prebtnVisible = false
      this.prebtnFile = ''
    },
    handleModals(value) {
      this.$refs.watermarks.visible = true
      this.$refs.watermarks.wValue = value
    },
    handleCategoryChange(val) {
      if (val) {
        if (this.categoryList.filter(v => v.id == val).length && this.categoryList.filter(v => v.id == val)[0].children) {
          this.professionalList = this.categoryList.filter(v => v.id == val)[0].children
        } else {
          this.professionalList = []
        }
      } else {
        this.professionalList = []
        this.$set(this.queryParam, 'professionalId', undefined)
      }
    },
    filterOption(input, option) {
      return (
        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
      );
    },
    getCategoryData() {
      getAction('/api/erp/files/professional/erpProfessionalCategory/list', {
        pageNo: 1,
        pageSize: -1
      }).then(res => {
        if (res.success) {
          this.categoryList = res.result.records || res.result
          if (this.categoryList.length > 0) {
          this.$set(this.dictOptions, 'categoryId', this.categoryList.map(v => {
            return {
              text: v.registrationCategory,
              title: v.registrationCategory,
              value: v.id
            }
          }))
          let newObj = []
          this.categoryList.forEach(val => {
            if (val.children && val.children.length > 0) {
              newObj.push(...val.children.map(c => {
                return {
                  text: c.registeredProfessional,
                  title: c.registeredProfessional,
                  value: c.id
                }
              }))
            }
          })
          this.$set(this.dictOptions, 'professionalId', newObj)
        }
        } else {
          this.categoryList = [];
        }
      }).catch(err => {
        this.$message.warning(err.message)
      })
    },
    handleModal(record) {
      if (!record.attachment) {
        this.$message.warning('暂无附件！')
        return
      }
      if (record.isAlways && record.isAlways == 0 && moment(record.endDate).diff(moment(), 'days') < 0) {
        this.$message.warning('文件已过期，不支持预览/下载')
        return
      }
      this.$refs.watermarks.visible = true
      this.$refs.watermarks.wValue = record.attachment
    },
    downloadOK() {
      getAction(this.url.downloadCertificate).then(result => {})
    },
    handlePreviews(value) {
      let fileType = value.substr(-3)
      let text = `${this.userInfo().orgCodeTxt}-${this.userInfo().realname}-${this.userInfo().workNo}`
      let url = window.sessionStorage.getItem('baseUrl') + '/api/erpmng/sys/common/static/' + value
      axios({
        url: url,
        params: {},
        method: 'get',
        responseType: 'blob'
      }).then(res => {
        if (fileType === 'pdf') {
          new PreviewPdf({
            blob: res,
            docTitle: fileType,
            isAddWatermark: true, // 是否需要添加水印
            watermark: { // watermark必填 里面可以不填
              type: 'canvas',
              text: text
            }
          })
        } else {
          this.$message.error('非pdf文件不可查看')
        }
      })
    },
    // 预览
    handlePreview(record) {
      if (!record.attachment) {
        this.$message.warning('暂无附件！')
        return
      }
      if (record.isAlways && record.isAlways == 0 && moment(record.endDate).diff(moment(), 'days') < 0) {
        this.$message.warning('文件已过期，不支持预览/下载')
        return
      }
      let fileType = record.attachment.substr(-3)
      let text = `${this.userInfo().orgCodeTxt}-${this.userInfo().realname}-${this.userInfo().workNo}`
      let url = window.sessionStorage.getItem('baseUrl') + '/api/erpmng/sys/common/static/' + record.attachment
      axios({
        url: url,
        params: {},
        method: 'get',
        responseType: 'blob'
      }).then(res => {
        if (fileType === 'pdf') {
          new PreviewPdf({
            blob: res,
            docTitle: fileType,
            isAddWatermark: true, // 是否需要添加水印
            watermark: { // watermark必填 里面可以不填
              type: 'canvas',
              text: text
            }
          })
        } else {
          this.$message.error('非pdf文件不可查看')
        }
      })
    },
    initDictConfig() {
      initDictOptions('erp_certificate_name_management,certificate_name,id').then(async(res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'certificateNames', res.result)
        }
      })
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error('请设置url.list属性!')
        return
      }
      // 加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1
      }
      var params = this.getQueryParams() // 查询条件
      params.pageUrl = this.$route.path
      this.loading = true
      getAction(this.url.list, params)
        .then((res) => {
          if (res.success) {
            let dValue = res.result.records || res.result
            let arr = []
            dValue.map(dValueItem => {
              if (dValueItem.certificateList) {
                const len = dValueItem.certificateList.length;
                let carr = dValueItem.certificateList.reduce((result, item) => {
                  const key = item.categoryId
                  if (!result[key]) {
                    result[key] = []
                  }
                  result[key].push(item)
                  return result
                }, {})
                let childrr = []
                Object.keys(carr).map(zevel => {
                  let childLen = carr[zevel].length
                  childrr.push(...carr[zevel].map((dItem, index) => {
                    return {
                      ...dItem,
                      childspan: index === 0 ? childLen : 0
                    }
                  }))
                })
                childrr.map((timeDataItem, index) => {
                  arr = [
                    ...arr,
                    {
                      ...dValueItem,
                      categoryId: timeDataItem.categoryId,
                      professionalId: timeDataItem.professionalId,
                      certificateNames: timeDataItem.certificateName,
                      issueBody: timeDataItem.issueBody,
                      issueDate: timeDataItem.issueDate,
                      educationDate: timeDataItem.educationDate,
                      endDate: timeDataItem.endDate,
                      attachment: timeDataItem.attachment,
                      isAlways: timeDataItem.isAlways,
                      isAction: timeDataItem.isAlways == 1 ? true : moment(timeDataItem.endDate).diff(moment(), 'days') >= 0,
                      span: index === 0 ? len : 0, // 各自的rowSpan计算出来放入对象
                      childspan: timeDataItem.childspan,
                      id: timeDataItem.id ? index === 0 ? dValueItem.id : timeDataItem.id : dValueItem.id
                    }
                  ]
                  return arr
                })
                // dValueItem.certificateList.map((timeDataItem,index)=>{
                //   arr = [
                //     ...arr,
                //     {
                //       ...dValueItem,
                //       categoryId: timeDataItem.categoryId,
                //       professionalId: timeDataItem.professionalId,
                //       certificateNames: timeDataItem.certificateName,
                //       issueBody:timeDataItem.issueBody,
                //       issueDate: timeDataItem.issueDate,
                //       educationDate: timeDataItem.educationDate,
                //       endDate: timeDataItem.endDate,
                //       attachment: timeDataItem.attachment,
                //       isAlways: timeDataItem.isAlways,
                //       isAction: timeDataItem.isAlways==1?true:moment(timeDataItem.endDate).diff(moment(),'days')>=0,
                //       span:index === 0 ? len : 0,  // 各自的rowSpan计算出来放入对象
                //       childspan: carr[timeDataItem.categoryId].length==1?1:carr[timeDataItem.categoryId].findIndex(e => e.id == timeDataItem.id)==0?carr[timeDataItem.categoryId].length:0
                //     }
                //   ]
                //   return arr
                // })
              } else {
                arr = [
                  ...arr,
                  {
                    ...dValueItem,
                    isAction: false
                  }
                ]
              }
            })
            // let zIndex = 0
            // this.dataSource = arr.map((item, index) => {
            //   item.key = index;
            //   if(item.span==0){
            //   } else {
            //     item.rowIndex = ++zIndex
            //   }
            //   return item;
            // })
            this.dataSource = arr
            if (res.result.total) {
              this.ipagination.total = res.result.total
            } else {
              this.ipagination.total = 0
            }
            // 判断是否当前页没有数据且不为第一页
            // if (this.dataSource.length == 0 && this.ipagination.current != 1) {
            //   this.ipagination.current = this.ipagination.current - 1
            //   this.loadData(this.ipagination.current - 1)
            // }
          } else {
            this.dataSource = []
            this.ipagination.total = 0
            this.$message.warning(res.message)
          }
          if (res.code === 510) {
            this.$message.warning(res.message)
          }
        })
        .catch((err) => {
          this.$message.warning(err.message)
        }).finally(() => {
          this.loading = false
        })
    },
    getQueryParams() {
      var param = Object.assign({}, this.queryParam, this.isorter)
      param.pageNo = this.ipagination.current
      param.pageSize = this.ipagination.pageSize
      return filterObj(param)
    },
    searchQuery() {
      this.loadData(1)
    },
    searchReset() {
      this.queryParam = {}
      this.professionalList = []
      this.loadData(1)
    },
    handleTableChange(page, pageSize) {
      this.ipagination.current = page
      this.ipagination.pageSize = pageSize
      this.loadData()
    }

  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.newColor{
  color: #c9c9c9;
}
</style>
